/*
 * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: CC0-1.0
 */

#pragma once

#include "sdkconfig.h"

/* 示例配置 */
#define 示例接收缓冲区大小  (2400)                           //EXAMPLE_RECV_BUF_SIZE
#define 示例采样率          (16000)                                 //EXAMPLE_SAMPLE_RATE
#define 示例主时钟倍数      (384) // If not using 24-bit data width, 256 should be enough EXAMPLE_MCLK_MULTIPLE
#define 示例主时钟频率    (示例采样率 * 示例主时钟倍数)  //EXAMPLE_MCLK_FREQ_HZ
#define 示例语音音量    CONFIG_EXAMPLE_VOICE_VOLUME   //EXAMPLE_VOICE_VOLUME
#if CONFIG_EXAMPLE_MODE_ECHO
#define 示例麦克风增益        CONFIG_EXAMPLE_MIC_GAIN
#endif


#if !defined(CONFIG_EXAMPLE_BSP)

/* I2C端口和GPIO */
#define I2C端口号         (0)
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#define I2C_串行时钟线      (GPIO_NUM_16)               //I2C_SCL_IO 
#define I2C_串行数据线      (GPIO_NUM_17)               //I2C_SDA_IO
#elif CONFIG_IDF_TARGET_ESP32H2
#define I2C_串行时钟线      (GPIO_NUM_8)
#define I2C_串行数据线      (GPIO_NUM_9)
#else
#define I2C_串行时钟线      (GPIO_NUM_1)
#define I2C_串行数据线      (GPIO_NUM_0)
#endif

/* I2S端口和GPIO */
#define I2S端口号         (0)               //I2S_NUM
#define I2S_主时钟线      (GPIO_NUM_10)
#define I2S_位时钟线      (GPIO_NUM_8)
#define I2S_帧同步线       (GPIO_NUM_12)
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#define I2S_数据输出线       (GPIO_NUM_18)
#define I2S_数据输入线       (GPIO_NUM_19)
#else
#define I2S_数据输出线       (GPIO_NUM_11)
#define I2S_数据输入线       (GPIO_NUM_7)
#endif


#else // CONFIG_EXAMPLE_BSP
#include "bsp/esp-bsp.h"
#define I2C端口号 BSP_I2C_NUM

#endif // CONFIG_EXAMPLE_BSP
